{include file="common/head_s"/}
<style type="text/css">
.layui-table-view{ margin: 0px!important; }
</style>
<div class="main">  
    <div class="layui-card-header">结算卡列表</div> 
   <!--  <div class="demoTable pd15 layui-form">  
        <a class="layui-btn layui-btn-primary" href="{:url(add)}" >提交提现申请</a>  
        <a class="layui-btn layui-btn-primary" href="{:url(addbank)}">添加收款账号</a>  
        <a class="layui-btn layui-btn-primary" href="{:url(banklist)}">结算卡列表</a>  
    </div> 
    <div class="demoTable pd15 layui-form">  
        <div class="layui-inline"> 
            <input type="text" class="layui-input" id="timess" placeholder="选择日期" style="width: 350px"> 
        </div>
        <button class="layui-btn layui-btn-primary" id="search" data-type="reload">搜索</button> 
        <button class="layui-btn layui-btn-primary" id="tototal" data-type="reload">统计</button> 
    </div>  -->
    <div class="pd15" style="padding-top: 0px;">
       <!--  <table class="layui-table layui-hide" id="total" lay-filter="tototal"></table>
        <br /> -->
        <table class="layui-table layui-hide" id="orderlist" lay-filter="listss"></table>
    </div> 
</div>
<script type="text/html" id="topNav">
    <a href="{:url('index')}" class="layui-btn layui-btn-sm"><i class="layui-icon">&#xe857;</i>结算管理</a> 
</script> 
<!-- <script type="text/html" id="topNav">
    <a href="{:url('index')}" class="layui-btn layui-btn-sm"><i class="layui-icon">&#xe857;</i>全部订单明细</a> 
    <div class="layui-btn layui-btn-sm layui-btn-primary" onclick="orderquan('today')"><i class="layui-icon">&#xe857;</i>今日订单明细</div> 
    <div class="layui-btn layui-btn-sm layui-btn-primary" onclick="orderquan('yesterday')"><i class="layui-icon">&#xe857;</i>昨日订单明细</div> 
    <div class="layui-btn layui-btn-sm layui-btn-primary" onclick="orderquan('week')"><i class="layui-icon">&#xe857;</i>本周订单明细</div> 
    <div class="layui-btn layui-btn-sm layui-btn-primary" onclick="orderquan('last week')"><i class="layui-icon">&#xe857;</i>上周订单明细</div> 
    <div class="layui-btn layui-btn-sm layui-btn-primary" onclick="orderquan('month')"><i class="layui-icon">&#xe857;</i>本月订单明细</div> 
    <div class="layui-btn layui-btn-sm layui-btn-primary" onclick="orderquan('last month')"><i class="layui-icon">&#xe857;</i>上月订单明细</div> 
</script>   -->
<script type="text/html" id="payinfo">
    {{# if(d.bankid){ }}<div onmouseover="layer.tips('{{d.bank_name}}<br>收款账号：{{d.bank_no}}<br>支付时间：{{d.paytime}}',this,{area: 'auto',tips: [1, '#333']});" onmouseout="layer.closeAll();">{{d.payname}}</div>{{# } }} 
</script> 
<script type="text/html" id="action">
    <a href="{:url('editbank')}?id={{d.id}}" class="layui-btn layui-btn-xs">编辑</a>
    <a onclick='return confirm("确定要删除吗？")' href="{:url('delbank')}?id={{d.id}}"  class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script type="text/html" id="paymentpic">
    {{# if(d.payment_img){ }}<img src="{{d.payment_img}}" width="200px" class="layui-upload-img" onclick="previewImg(this)" >{{# } }}
</script> 
<script src="/static/plugins/layui/layui.js"></script> 
<script>
    layui.use(['table','form','laydate'], function() { 
        var table = layui.table,form = layui.form, $ = layui.jquery,laydate = layui.laydate;
        laydate.render({
            elem: '#timess',range: true,type: 'datetime'
        });
        tableIn = table.render({
            id: 'listss',
            elem: '#orderlist',
			toolbar: '#topNav',
            url: '{:url("banklist")}',
            method: 'post', 
            page: true,
            cols: [[  
                {field: 'id', title: 'ID',align: 'center', width:50, fixed: true},
                {field: 'paytype', title: '收款类型',align: 'center', width: 150, fixed: true},
                {field: 'bankname', title: '收款详情',align: 'center', width: 250, fixed: true},
                {field: 'bankno', title: '收款账号',align: 'center', width: 200, fixed: true},
                {field: 'user', title: '收款人姓名',align: 'center', width: 120},
                {field: 'mobile', title: '预留电话',align: 'center', width: 150}, 
                {field: 'payment_img', title: '收款码',align: 'center', width: 160,templet: '#paymentpic'},     
                {field: 'addtime', title: '提交时间',align: 'center', width: 160},   
                // {field: 'note', title: '备注信息',align: 'center', width: 120}, 
                {width: 160, align: 'center', toolbar: '#action'}    
            ]],
            limit: 10 //每页默认显示的数量
        });  
        // //搜索
        // $('#search').on('click', function() {
        //     var timess = $('#timess').val();
        //     if($.trim(timess)==='') {
        //         layer.msg('请输入时间！',{icon:0});
        //         return;
        //     }else{
        //         tableIn.reload({ page: {page: 1},where: {timess: timess}});
        //     } 
        // });
        //  //统计
        //  totalIn = table.render({ 
        //     id: '#totals',      
        //     elem: '#total',
        //     url: '{:url("total")}',
        //     method: 'post', 
        //     cols: [[ 
        //         {field: 'order_total', title: '<span style="color: orange;">商户订单总额</span>',align: 'center', width:200, fixed: true},
        //         {field: 'income', title: '<span style="color: green;">商户手续费</span>',align: 'center', width:200, fixed: true},
        //         {field: 'cash', title: '<span style="color: green;">已提现总额</span>',align: 'center', width:200, fixed: true},
        //         {field: 'shop_total', title: '<span style="color: red;">商户余额</span>',align: 'center', width:200, fixed: true},
        //         {field: 'today_order_total', title: '<span style="color: orange;">今日商户订单总额</span>',align: 'center', width:200, fixed: true},
        //         {field: 'today_income', title: '<span style="color: green;">今日商户手续费</span>',align: 'center', width:200, fixed: true},
        //         {field: 'today_cash', title: '<span style="color: green;">今日提现总额</span>',align: 'center', width:200, fixed: true},
        //         // {field: 'shop_total', title: '<span style="color: red;">商户余额</span>',align: 'center', width:200, fixed: true},
        //     ]],
        //     // limit395 391: 60 //每页默认显示的数量258998 96197 40053 134 9
        // });
        // $('#tototal').on('click', function() {
        //     var timess = $('#timess').val();
        //     if($.trim(timess)==='') {
        //         layer.msg('请输入时间！',{icon:0});
        //         return;
        //     }else{
        //         totalIn.reload({ page: {page: 1},where: {timess: timess}});
        //     } 
        // });
        
    });

</script>
<script type="text/javascript">
    function delb(){
        if (confirm("确定要删除吗？")==true){
           
        } else{    
            return false; 
        }       
    }
    function previewImg(obj) {
        var img = new Image();  
        img.src = obj.src;
        var imgHtml = "<img src='" + obj.src + "' width='500px' height='500px'/>";  
        //弹出层
        layer.open({  
            type: 1,  
            shade: 0.8,
            offset: 'auto',
            area: [500 + 'px',550+'px'],
            shadeClose:true,
            scrollbar: false,
            title: "图片预览", //不显示标题  
            content: imgHtml, //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响  
            cancel: function () {  
                //layer.msg('捕获就是从页面已经存在的元素上，包裹layer的结构', { time: 5000, icon: 6 });  
            }  
        }); 
    }
</script>
</body>
</html>